package com.rmuti.acm.string;

public class StringCount {
	
	public static void main(String[] args) {
		String str = "Hello,world,123";
		int counter = 0;
		for (int i = 0; i < str.length(); i++) {
			String subStr = str.substring(i, i + 1);
			if (",".equals(subStr))
				counter++;
		}
		System.out.println("string , is " + counter);
	}

}
